home *** CD-ROM | disk | FTP | other *** search
- Path: netapp.com!not-for-mail
- From: guy@netapp.com (Guy Harris)
- Newsgroups: comp.arch,comp.lang.c
- Subject: Re: Did Microsoft decree a byte order?
- Date: 5 Jan 1996 11:43:30 -0800
- Organization: Network Appliance
- Message-ID: <4cjv12$rkk@bayonne.netapp.com>
- References: <4c80dp$9du@hobbes.sco.COM> <DKIp84.9Az@calcite.rhyolite.com> <jgkDKMn2x.2KA@netcom.com> <DKMx16.E2M@calcite.rhyolite.com>
- NNTP-Posting-Host: 192.9.200.18
- Keywords: byte
-
- Vernon Schryver <vjs@calcite.rhyolite.com> wrote:
- >Contemplate the byte-order dependencies in the tar. There are programs
- >that can read and write all of the common cpio and tar formats, and
- >these programs can be compiled to run on either big or little endian
- >machines. Nevertheless, neither tar nor cpio use XDR or ANS.1.
-
- Correct.
-
- "tar" uses ASCII.
-
- "cpio -c" uses ASCII.
-
- "cpio" without "-c" uses binary, but, fortunately, there's a
- more-than-one-byte magic number at the front of a "cpio" archive, so a
- clueful "cpio" archive reader can look at the magic number and figure
- out whether the archive was written on a big-endian or little-endian
- machine.
-
- >Yes, you often use ASCII, but only for trivial amounts of data
-
- Such as "tar" and "cpio" control information? Neither "tar" nor "cpio"
- use any machine-independent representation for file data, but I'm not
- sure it would be possible to *make* it do so, without having an
- "object-oriented file system" in which each file has a serialize method
- associated with it (i.e., "tar" or "cpio" in most OSes has no idea what
- format the file it's writing is in).
-